﻿namespace WMS6.Web.Administration
{
    using System;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using WMS6.Web;

    public class AuditConfigureQuery : BasePage
    {
        protected Button btnExport;
        protected Button btnList;
        protected Button btnSearch;
        protected DropDownList ddlTableName;
        protected HtmlForm F1210;
        protected HtmlInputHidden hdnActionID;
        protected Label lblCreateWh;
        protected Label lblTableName;
        protected HtmlLink mycss;
        protected TextBox txtTableName;

        protected void btnList_Click(object sender, EventArgs e)
        {
            base.Server.Transfer(string.Format("AuditConfigureList.aspx?action={0}&from=list", this.hdnActionID.Value.Trim()), false);
        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            base.Server.Transfer(string.Format("AuditConfigureList.aspx?action={0}", this.hdnActionID.Value.Trim()), false);
        }

        private void InitDropDownList()
        {
            base.InitQueryDDL(this.ddlTableName, 0);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                base.InitPage(this.Page);
                this.InitDropDownList();
            }
        }

        public string TableName
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtTableName.Text.Trim()))
                {
                    return base.GetParamsString(this.txtTableName.Text.Trim(), this.ddlTableName.SelectedValue);
                }
                return "";
            }
        }
    }
}

